bootstrap Function

public function bootstrap(stat, x, method, nsamples, alpha) result(rst)

Performs a bootstrap calculation on the supplied data set for the given statistic. The default implementation utlizes a random resampling with replacement. Other resampling methods may be defined by specifying an appropriate routine by means of the method input. The module provides another option, random_resample, which is a parametric Gaussian bootstrap based on the sample mean and standard deviation. It assumes normally distributed observations. The confidence limits are percentile intervals calculated from the bootstrap replicates.

Arguments

Type IntentOptional Attributes Name
procedure(bootstrap_statistic_routine), intent(in), pointer :: stat

The routine used to compute the desired statistic.

real(kind=real64), intent(in), dimension(:) :: x

The N-element data set.

procedure(bootstrap_resampling_routine), intent(in), optional, pointer :: method

An optional pointer to the method to use for resampling of the data. If no method is supplied, a random resampling is utilized.

integer(kind=int32), intent(in), optional :: nsamples

An optional input, that if supplied, specifies the number of bootstrap replicates to generate. The default is 10 000.

real(kind=real64), intent(in), optional :: alpha

An optional input, that if supplied, defines the significance level to use for the analysis. The default is 0.05.

Return Value type(bootstrap_statistics)

The resulting bootstrap_statistics type containing the confidence intervals, bias, standard error, etc. for the analyzed statistic.